import { request, ResponseBody } from "@/utils/request";

/**授权响应 */
export interface EmpowerResult {
  openid: string;
  access_token: string;
  avatar: string;
  nickname: string;
  ballLevel: number;
  sex: number;
}
/**授权登录 */
export const empower = (code: string) => {
  return request<ResponseBody<EmpowerResult>>({
    url: "/empower",
    method: "POST",
    data: { code },
  });
};
